commonlibsse_ng\re\t/
TESCamera.rs

1use crate::re::BSTPoint::{BSTPoint2, BSTPoint3};
2use crate::re::BSTSmartPointer::BSTSmartPointer;
3use crate::re::NiNode;
4use crate::re::NiSmartPointer::NiPointer;
5use crate::re::TESCameraState::TESCameraState;
6use crate::re::offsets_rtti::RTTI_TESCamera;
7use crate::re::offsets_vtable::VTABLE_TESCamera;
8use crate::rel::id::VariantID;
9use core::ffi::c_void;
10
11#[repr(C)]
12#[derive(Debug, Clone, PartialEq)]
13pub struct TESCamera {
14    pub vtable: *const TESCameraVtbl,                  // 0x00
15    pub rotationInput: BSTPoint2<f32>,                 // 0x08
16    pub translationInput: BSTPoint3<f32>,              // 0x10
17    pub zoomInput: f32,                                // 0x1C
18    pub cameraRoot: NiPointer<NiNode>,                 // 0x20
19    pub currentState: BSTSmartPointer<TESCameraState>, // 0x28
20    pub enabled: bool,                                 // 0x30
21    pub pad31: u8,                                     // 0x31
22    pub pad32: u16,                                    // 0x32
23    pub pad34: u32,                                    // 0x34
24}
25const _: () = assert!(std::mem::size_of::<TESCamera>() == 0x38);
26
27impl TESCamera {
28    /// Address & offset of the runtime type information (RTTI) identifier.
29    pub const RTTI: VariantID = RTTI_TESCamera;
30
31    /// Address & offset of the virtual function table.
32    pub const VTABLE: [VariantID; 1] = VTABLE_TESCamera;
33
34    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 32290, ae_id = 33026)]
35    #[inline]
36    pub fn set_state(&mut self, state: *mut TESCameraState) {}
37}
38
39#[repr(C)]
40#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
41pub struct TESCameraVtbl {
42    /// C++ Destructor `~TESCamera`
43    pub CxxDrop: fn(this: *mut c_void), // 0x00
44    pub SetCameraRoot: fn(this: *mut c_void, root: NiPointer<NiNode>), // 0x01 - { if (cameraRoot != a_root) cameraRoot }
45    pub Update: fn(this: *mut c_void),                                 // 0x02
46}
47const _: () = {
48    const VFUNC_COUNT: usize = 0x3;
49
50    const EXPECTED_SIZE: usize = VFUNC_COUNT * core::mem::size_of::<usize>();
51    assert!(core::mem::size_of::<TESCameraVtbl>() == EXPECTED_SIZE);
52};